<!DOCTYPE html>
<html>
<head>
    <title>BootstrapValidator demo</title>

    <link rel="stylesheet" href="../vendor/bootstrap/css/bootstrap.css"/>
    <link rel="stylesheet" href="../dist/css/bootstrapValidator.css"/>

    <script type="text/javascript" src="../vendor/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="../vendor/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../dist/js/bootstrapValidator.js"></script>
</head>
<body>
<div class="container">
    <div class="row">
        <!-- form: -->
        <section>
            <div class="col-lg-8 col-lg-offset-2">
                <div class="page-header">
                    <h2>Sign up</h2>
                </div>

                <form id="defaultForm" method="post" class="form-horizontal" action="target.php"
                      data-bv-message="This value is not valid"
                      data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
                      data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
                      data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
                    <div class="form-group">
                        <label class="col-lg-3 control-label">Full name</label>
                        <div class="col-lg-4">
                            <input type="text" class="form-control" name="firstName" placeholder="First name" data-bv-trigger="keyup" required data-bv-notempty-message="The first name is required and cannot be empty" />
                        </div>
                        <div class="col-lg-4">
                            <input type="text" class="form-control" name="lastName" placeholder="Last name" required data-bv-trigger="blur" data-bv-notempty-message="The last name is required and cannot be empty" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-lg-3 control-label">Username</label>
                        <div class="col-lg-5">
                            <input type="text" class="form-control" name="username"
                                   data-bv-trigger="blur"
                                   data-bv-message="The username is not valid"
                                   required data-bv-notempty-message="The username is required and cannot be empty"
                                   pattern="[a-zA-Z0-9_\.]+" data-bv-regexp-message="The username can only consist of alphabetical, number, dot and underscore"
                                   minlength="5" data-bv-stringlength-message="The username must have at least 5 characters" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-lg-3 control-label">Email address</label>
                        <div class="col-lg-5">
                            <input class="form-control" name="email" type="email" required data-bv-emailaddress-message="The input is not a valid email address" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-lg-3 control-label">Website</label>
                        <div class="col-lg-5">
                            <input class="form-control" name="website" type="url" required data-bv-uri-message="The input is not a valid website address" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-lg-3 control-label">Fav color</label>
                        <div class="col-lg-3">
                            <input class="form-control" name="color" type="color" required data-bv-hexcolor-message="The input is not a valid color code" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-lg-3 control-label">Age</label>
                        <div class="col-lg-2">
                            <input type="number" class="form-control" name="age" step="1"
                                   min="10" data-bv-greaterthan-inclusive="false" data-bv-greaterthan-message="The input must be greater than or equal to 10"
                                   max="100" data-bv-lessthan-inclusive="true" data-bv-lessthan-message="The input must be less than 100"
                                    />
                            <!--<input type="range" class="form-control" name="age"
                                   required
                                   min="10" max="100" data-bv-between-message="The input must be between 10 and 100"
                                    />-->
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-lg-3 control-label">Bio</label>
                        <div class="col-lg-5">
                            <textarea class="form-control" name="bio" rows="10" data-bv-stringlength data-bv-stringlength-max="100" data-bv-stringlength-message="The bio must be less than 100 characters long"></textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-lg-9 col-lg-offset-3">
                            <button type="submit" class="btn btn-primary">Sign up</button>
                        </div>
                    </div>
                </form>
            </div>
        </section>
        <!-- :form -->
    </div>
</div>

<script type="text/javascript">
    $(document).ready(function() {
        $('#defaultForm').bootstrapValidator();
    });
</script>
</body>
</html>